Why can't I convert FLV to MP4 format using FFmpeg when MP3 works?
Posted
by
hugemeow
on Super User
See other posts from Super User
or by hugemeow
Published on 2012-10-14T14:27:05Z
Indexed on
2012/10/14
15:41 UTC
Read the original article
Hit count: 661
In fact I have succeeded to convert FLV to MP3:
D:\tmp\ffmpeg-20121005-git-d9dfe9a-win64-static\ffmpeg-20121005-git-d9dfe9a-win
4-static\bin>ffmpeg.exe -i a.flv -acodec mp3 a.mp3
ffmpeg version N-45080-gd9dfe9a Copyright (c) 2000-2012 the FFmpeg developers
built on Oct 5 2012 16:49:01 with gcc 4.7.1 (GCC)
configuration: --enable-gpl --enable-version3 --disable-pthreads --enable-run
ime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libass
-enable-libcelt --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-
ibfreetype --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libopen
peg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libthe
ra --enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-l
bvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --en
ble-zlib
libavutil 51. 73.102 / 51. 73.102
libavcodec 54. 63.100 / 54. 63.100
libavformat 54. 29.105 / 54. 29.105
libavdevice 54. 3.100 / 54. 3.100
libavfilter 3. 19.102 / 3. 19.102
libswscale 2. 1.101 / 2. 1.101
libswresample 0. 16.100 / 0. 16.100
libpostproc 52. 1.100 / 52. 1.100
Input #0, flv, from 'a.flv':
Metadata:
metadatacreator : iku
hasKeyframes : true
hasVideo : true
hasAudio : true
hasMetadata : true
canSeekToEnd : false
datasize : 16906383
videosize : 14558526
audiosize : 2270465
lasttimestamp : 530
lastkeyframetimestamp: 529
lastkeyframelocation: 16893721
Duration: 00:08:49.73, start: 0.000000, bitrate: 255 kb/s
Stream #0:0: Video: h264 (Main), yuv420p, 448x336 [SAR 1:1 DAR 4:3], 218 kb
s, 15 tbr, 1k tbn, 30 tbc
Stream #0:1: Audio: aac, 44100 Hz, stereo, s16, 32 kb/s
File 'a.mp3' already exists. Overwrite ? [y/N] y
Output #0, mp3, to 'a.mp3':
Metadata:
metadatacreator : iku
hasKeyframes : true
hasVideo : true
hasAudio : true
hasMetadata : true
canSeekToEnd : false
datasize : 16906383
videosize : 14558526
audiosize : 2270465
lasttimestamp : 530
lastkeyframetimestamp: 529
lastkeyframelocation: 16893721
TSSE : Lavf54.29.105
Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16
Stream mapping:
Stream #0:1 -> #0:0 (aac -> libmp3lame)
Press [q] to stop, [?] for help
size= 8279kB time=00:08:49.78 bitrate= 128.0kbits/s
video:0kB audio:8278kB subtitle:0 global headers:0kB muxing overhead 0.006842%
But I failed to convert FLV to MP4. Why is the encoder 'mp4' unknown? What's more, how can I find the codecs which are already supported by my FFmpeg?
D:\tmp\ffmpeg-20121005-git-d9dfe9a-win64-static\ffmpeg-20121005-git-d9dfe9a-win6
4-static\bin>ffmpeg.exe -i a.flv -acodec mp4 aa.mp4
ffmpeg version N-45080-gd9dfe9a Copyright (c) 2000-2012 the FFmpeg developers
built on Oct 5 2012 16:49:01 with gcc 4.7.1 (GCC)
configuration: --enable-gpl --enable-version3 --disable-pthreads --enable-runt
ime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libass -
-enable-libcelt --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-l
ibfreetype --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libopenj
peg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheo
ra --enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-li
bvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --ena
ble-zlib
libavutil 51. 73.102 / 51. 73.102
libavcodec 54. 63.100 / 54. 63.100
libavformat 54. 29.105 / 54. 29.105
libavdevice 54. 3.100 / 54. 3.100
libavfilter 3. 19.102 / 3. 19.102
libswscale 2. 1.101 / 2. 1.101
libswresample 0. 16.100 / 0. 16.100
libpostproc 52. 1.100 / 52. 1.100
Input #0, flv, from 'a.flv':
Metadata:
metadatacreator : iku
hasKeyframes : true
hasVideo : true
hasAudio : true
hasMetadata : true
canSeekToEnd : false
datasize : 16906383
videosize : 14558526
audiosize : 2270465
lasttimestamp : 530
lastkeyframetimestamp: 529
lastkeyframelocation: 16893721
Duration: 00:08:49.73, start: 0.000000, bitrate: 255 kb/s
Stream #0:0: Video: h264 (Main), yuv420p, 448x336 [SAR 1:1 DAR 4:3], 218 kb/
s, 15 tbr, 1k tbn, 30 tbc
Stream #0:1: Audio: aac, 44100 Hz, stereo, s16, 32 kb/s
Unknown encoder 'mp4'
© Super User or respective owner